home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_actor_pd.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
2KB
|
83 lines
# Jedi Knight Cog Script
#
# ACTOR_PD.COG
#
#
# Actor COG for Probe Droid
# Possibly creates powerup upon death
#
#
# [CR]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
#
# ========================================================================================
symbols
message killed
message skill
message damaged
template powerup=+DShield local
template powerup1=+DEnergyCell local
thing newThing local
flex rval local
flex damage local
flex damageType local
int player local
end
# ========================================================================================
code
killed:
rval = Rand();
if (rval < 0.3)
{
newThing = CreateThing(powerup1, GetSenderRef());
SetLifeleft(newThing, 200.0);
}
else if (rval < 0.4)
{
newThing = CreateThing(powerup, GetSenderRef());
SetLifeleft(newThing, 200.0);
}
return;
# ........................................................................................
skill:
ReturnEx(-1);
return;
damaged:
damage = GetParam(0);
damageType = GetParam(1);
if(BitTest(damageType, 0x01))
{
damage = damage * 0.50;
}
player = GetLocalPlayerThing();
if(GetThingParent(GetSourceRef()) == player)
{
if (GetCurWeapon(player) == 1)
{
if (GetThingHealth(player) > 1)
{
DamageThing(player, 1, 0x1, player);
}
}
}
ReturnEx(damage);
return;
end